<template>
  <div>
      <!-- <p>{{msg | handleStr}}</p> -->
      <p>{{msg | handleString}}</p>
      <el-button type="primary">主要按钮</el-button>
      </div>
</template>

<script>
export default {
     data(){
        return{
            msg:"未经允许，擅自特别喜欢你，不好意思了"
        }
    },
    /* filters:{
        handleStr(val){
            if(val.length>4){
                val=val.slice(0,4)+"..."
            }
            return val
        }
    } */
}
</script>

<style>

</style>